
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>升级智能合约 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="chap9.html" />
    
    
    <link rel="prev" href="chap7.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    编译部署
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="chap1.html">
            
                <a href="chap1.html">
            
                    
                    编译与测试网络部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="chap2.html">
            
                <a href="chap2.html">
            
                    
                    网络生成配置说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="chap3.html">
            
                <a href="chap3.html">
            
                    
                    启动网络脚本配置剖析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    通道实践
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="chap4.html">
            
                <a href="chap4.html">
            
                    
                    创建加入通道
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="chap5.html">
            
                <a href="chap5.html">
            
                    
                    更新通道配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="chap6.html">
            
                <a href="chap6.html">
            
                    
                    动态添加组织
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    合约实践
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="chap7.html">
            
                <a href="chap7.html">
            
                    
                    安装发布智能合约
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.2" data-path="chap8.html">
            
                <a href="chap8.html">
            
                    
                    升级智能合约
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="chap9.html">
            
                <a href="chap9.html">
            
                    
                    智能合约设置背书策略
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="chap10.html">
            
                <a href="chap10.html">
            
                    
                    调试go智能合约
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="chap11.html">
            
                <a href="chap11.html">
            
                    
                    外部构建启动合约
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    SDK实践
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="chap12.html">
            
                <a href="chap12.html">
            
                    
                    基于Java SDK实现合约交易
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >升级智能合约</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p>&#x7EE7;&#x7EED;&#x4E0A;&#x4E00;&#x7AE0;&#xFF0C;&#x63A5;&#x4E0B;&#x6765;&#x5C06;&#x8FDB;&#x884C;&#x667A;&#x80FD;&#x5408;&#x7EA6;&#x5408;&#x7EA6;&#x7684;&#x5347;&#x7EA7;
&#x8FD8;&#x662F;&#x5148;&#x5728;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165; <code>docker exec -it cli bash</code> &#x8FDB;&#x5165;cli&#x7684;&#x63A7;&#x5236;&#x53F0;&#xFF0C;&#x9ED8;&#x8BA4;cli&#x7684;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x8282;&#x70B9;&#x4E3A; peer0.org1.example.com.</p>
<h2 id="1&#x67E5;&#x770B;&#x9700;&#x8981;&#x5347;&#x7EA7;&#x7684;&#x667A;&#x80FD;&#x5408;&#x7EA6;&#x4FE1;&#x606F;">1.&#x67E5;&#x770B;&#x9700;&#x8981;&#x5347;&#x7EA7;&#x7684;&#x667A;&#x80FD;&#x5408;&#x7EA6;&#x4FE1;&#x606F;</h2>
<p>&#x76EE;&#x524D;&#x5DF2;&#x90E8;&#x7F72;&#x4E00;&#x4E2A;&#x667A;&#x80FD;&#x5408;&#x7EA6;&#x5230; peer0.org1.example.com&#xFF0C;cli&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-bash">peer lifecycle chaincode queryinstalled
</code></pre>
<p>&#x67E5;&#x770B;mycc&#x5408;&#x7EA6;&#x7684;package_id&#x5982;&#x4E0B;&#xFF1A;
<img src="https://img-blog.csdnimg.cn/20200215215610268.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p>&#x67E5;&#x770B;mycc&#x5728;mychannel&#x901A;&#x9053;&#x7684;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;&#xFF0C;cli&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-bash">peer lifecycle chaincode querycommitted -C mychannel
</code></pre>
<p>&#x53EF;&#x4EE5;&#x770B;&#x5230;mycc&#x5177;&#x4F53;&#x4FE1;&#x606F;
<img src="https://img-blog.csdnimg.cn/2020021521562028.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;">
| &#x53C2;&#x6570; |&#x4E2D;&#x6587;&#x63CF;&#x8FF0;  | &#x503C;
|--|--|--|
| Name  |&#x5408;&#x7EA6;&#x540D;&#x79F0;  |mycc
|Version |&#x5408;&#x7EA6;&#x7248;&#x672C;|1
|Sequence |&#x5408;&#x7EA6;&#x5E8F;&#x5217;&#x53F7;(&#x5347;&#x7EA7;1&#x6B21;&#xFF0C;&#x52A0;1) |1
|Endorsement Plugin|&#x80CC;&#x4E66;&#x63D2;&#x4EF6;|escc
|Validation Plugin|&#x6821;&#x9A8C;&#x63D2;&#x4EF6;|vscc</p>
<p>&#x6267;&#x884C;&#x4E00;&#x6B21;query&#x64CD;&#x4F5C;&#x65B9;&#x4FBF;&#x540E;&#x9762;&#x5BF9;&#x6BD4;</p>
<pre><code class="lang-bash"> peer chaincode query -C mychannel -n mycc -c <span class="hljs-string">&apos;{&quot;Args&quot;:[&quot;query&quot;,&quot;a&quot;]}&apos;</span>
</code></pre>
<p>&#x6B64;&#x65F6;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;a&#x7684;&#x503C;&#x4E3A;90
<img src="https://img-blog.csdnimg.cn/20200215215910123.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<h2 id="2-&#x4FEE;&#x6539;&#x5408;&#x7EA6;&#x4EE3;&#x7801;">2 &#x4FEE;&#x6539;&#x5408;&#x7EA6;&#x4EE3;&#x7801;</h2>
<p>&#x5047;&#x5982;&#x672C;&#x5730;&#x4E0D;&#x5B58;&#x5728;&#x8BE5;&#x5408;&#x7EA6;&#x4EE3;&#x7801;&#xFF0C;2.0&#x63D0;&#x4F9B;&#x4ECE;&#x8282;&#x70B9;&#x4E0A;&#x83B7;&#x53D6;&#x4EE3;&#x7801;&#x5305;&#x7684;&#x64CD;&#x4F5C;
&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;</p>
<pre><code class="lang-bash"> peer lifecycle chaincode getinstalledpackage --package-id  mycc_1:00ef9e95ea103b2c27eacd5a62efd9b34863c672d236a1ce99a7d539b2f9ef7a
</code></pre>
<p>packge-id&#xFF1A;&#x4F7F;&#x7528;1&#x6B65;&#x9AA4;&#x4E2D;&#x67E5;&#x8BE2;&#x83B7;&#x53D6;&#x7684;&#x5408;&#x7EA6;packge_id</p>
<p>&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x51FA;&#x73B0;mycc.tar.gz&#x5305;&#x4E3A;&#x5408;&#x7EA6;&#x5305;&#xFF0C;&#x89E3;&#x538B;&#x5408;&#x7EA6;&#x5305;&#x91CC;&#x9762;&#x7684;code.tar&#xFF0C;&#x7F16;&#x8F91;&#x5408;&#x7EA6;&#x4EE3;&#x7801;
&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#x9ED8;&#x8BA4;&#x52A0;10
<img src="https://img-blog.csdnimg.cn/2020021521591983.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTQwNDQz,size_16,color_FFFFFF,t_70" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p><img src="https://img-blog.csdnimg.cn/20200215215925475.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTQwNDQz,size_16,color_FFFFFF,t_70" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<h2 id="3-&#x91CD;&#x65B0;&#x6253;&#x5305;&#x5408;&#x7EA6;">3. &#x91CD;&#x65B0;&#x6253;&#x5305;&#x5408;&#x7EA6;</h2>
<p>&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x6253;&#x5305;&#x5408;&#x7EA6;&#xFF1A;</p>
<pre><code class="lang-bash"> peer lifecycle chaincode package mycc.tar.gz --path github.com/hyperledger/fabric-samples/chaincode/abstore/go/ --lang golang --label mycc_1
</code></pre>
<p>&#x5C06;&#x6839;&#x636E;&#x65B0;&#x7684;&#x5408;&#x7EA6;&#x4EE3;&#x7801;&#x6253;&#x5305;&#x6210;&#x65B0;&#x7684;&#x667A;&#x80FD;&#x5408;&#x7EA6;&#x5305;mycc.tar.gz</p>
<h2 id="4-&#x91CD;&#x65B0;&#x5B89;&#x88C5;&#x5408;&#x7EA6;">4. &#x91CD;&#x65B0;&#x5B89;&#x88C5;&#x5408;&#x7EA6;</h2>
<p>&#x66F4;&#x65B0;&#x5408;&#x7EA6;&#x4EE3;&#x7801;&#x9700;&#x8981;&#x91CD;&#x65B0;&#x5C06;&#x5408;&#x7EA6;&#x5B89;&#x88C5;&#x5230;&#x8282;&#x70B9;&#x4E0A; </p>
<pre><code class="lang-bash">peer lifecycle chaincode install mycc.tar.gz
</code></pre>
<p>&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;&#x5408;&#x7EA6;&#x5B89;&#x88C5;&#x4FE1;&#x606F;&#xFF1A;</p>
<p><img src="https://img-blog.csdnimg.cn/20200215215941863.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p>&#x6B64;&#x65F6;&#x6211;&#x4EEC;&#x518D;&#x67E5;&#x8BE2;&#x4E00;&#x4E0B;&#x8282;&#x70B9;&#x5B89;&#x88C5;&#x5408;&#x7EA6;&#x4FE1;&#x606F;&#xFF0C;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#xFF1A;</p>
<pre><code class="lang-bash">peer lifecycle chaincode queryinstalled
</code></pre>
<p>&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;&#xFF1A;
<img src="https://img-blog.csdnimg.cn/20200215215955218.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p>&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x65B0;&#x589E;&#x4E86;&#x4E00;&#x4E2A;package_id&#x4E0D;&#x4E00;&#x6837;&#x7684;mycc,&#x539F;&#x6765;&#x7684;&#x8FD8;&#x5728;&#x3002;</p>
<h2 id="5&#x4FEE;&#x6539;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;">5.&#x4FEE;&#x6539;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;</h2>
<p>&#x771F;&#x6B63;&#x5347;&#x7EA7;&#x7684;&#x64CD;&#x4F5C;&#x5176;&#x5B9E;&#x662F;&#x5728;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;&#x8FD9;&#x4E00;&#x6B65;&#x9AA4;
&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#xFF0C;<code>&#x4E0E;&#x539F;&#x6765;&#x76F8;&#x6BD4;&#x5C06;package_id&#x4FEE;&#x6539;&#x4E3A;&#x65B0;&#x5B89;&#x88C5;&#x7684;&#x5408;&#x7EA6;package_id&#xFF0C;sequence&#x8981;&#x6539;&#x6210;2&#xFF0C;&#x56E0;&#x4E3A;install&#x4E86;2&#x6B21;</code></p>
<pre><code class="lang-bash">peer lifecycle chaincode approveformyorg --tls <span class="hljs-literal">true</span> --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --channelID mychannel --name mycc --version 1 --init-required --package-id  mycc_1:2f358faa3475e5c37a90be9a7c0db2f608ecb09b13f64b001f83799be9fccc77 --sequence 2 --waitForEvent
</code></pre>
<p><img src="https://img-blog.csdnimg.cn/20200215220007895.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p>&#x68C0;&#x67E5;approve&#x72B6;&#x6001;&#xFF0C;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#xFF1A;</p>
<pre><code class="lang-bash">peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name mycc --version 1 --sequence 2 --output json --init-required
</code></pre>
<p><code>sequence&#x8981;&#x6539;&#x6210;2&#xFF0C;&#x56E0;&#x4E3A;install&#x4E86;2&#x6B21;&#xFF0C;&#x5426;&#x5219;&#x62A5;&#x9519;Error: query failed with status: 500 - failed to invoke backing implementation of &apos;CheckCommitReadiness&apos;: requested sequence is 1, but new definition must be sequence 2</code></p>
<h2 id="6&#x5207;&#x6362;&#x8282;&#x70B9;&#x91CD;&#x590D;-3&#xFF0C;4&#xFF0C;5&#x64CD;&#x4F5C;">6.&#x5207;&#x6362;&#x8282;&#x70B9;&#x91CD;&#x590D; 3&#xFF0C;4&#xFF0C;5&#x64CD;&#x4F5C;</h2>
<p>&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x5207;&#x6362;peer0.org2.example.com&#xFF0C;&#x91CD;&#x590D;3&#xFF0C;4&#xFF0C;5&#x6B65;&#xFF0C;&#x77E5;&#x9053;&#x51FA;&#x73B0;&#x4EE5;&#x4E0B;&#x7ED3;&#x679C;
<img src="https://img-blog.csdnimg.cn/2020021522010997.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<h2 id="7&#x91CD;&#x65B0;&#x63D0;&#x4EA4;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;">7.&#x91CD;&#x65B0;&#x63D0;&#x4EA4;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;</h2>
<p>&#x5B8C;&#x6210;&#x667A;&#x80FD;&#x5408;&#x7EA6;lifecycle&#x7B56;&#x7565;&#x540E;&#xFF0C;&#x91CD;&#x65B0;&#x63D0;&#x4EA4;&#x5408;&#x7EA6;&#x5B9A;&#x4E49;</p>
<pre><code class="lang-bash"> peer lifecycle chaincode commit -o orderer.example.com:7050 --tls <span class="hljs-literal">true</span> --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --channelID mychannel --name mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt --version 1 --sequence 2 --init-required
</code></pre>
<p><code>&#x6CE8;&#x610F;&#x5E8F;&#x5217;&#x53F7;sequence</code></p>
<p>&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;&#x4EE5;&#x4E0B;&#x7ED3;&#x679C;&#xFF1A;</p>
<p><img src="https://img-blog.csdnimg.cn/20200215220132660.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<p>&#x6B64;&#x65F6;&#x901A;&#x8FC7;&#x65B0;&#x7684;&#x667A;&#x80FD;&#x5408;&#x7EA6;&#x67E5;&#x8BE2;a&#x7684;&#x503C;&#xFF0C;&#x8FD8;&#x662F;&#x4E3A;90</p>
<p><img src="https://img-blog.csdnimg.cn/20200215220139267.png" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>
<h2 id="8&#x68C0;&#x9A8C;&#x65B0;&#x5408;&#x7EA6;&#x4EE3;&#x7801;">8.&#x68C0;&#x9A8C;&#x65B0;&#x5408;&#x7EA6;&#x4EE3;&#x7801;</h2>
<p>&#x521A;&#x521A;&#x6DFB;&#x52A0;&#x4E86;addTen&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#xFF0C;&#x7406;&#x8BBA;&#x4E0A;a&#x5E94;&#x8BE5;&#x52A0;10&#x7B49;&#x4E8E;100
&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x8C03;&#x7528;addTen</p>
<pre><code class="lang-bash"> peer chaincode invoke -o orderer.example.com:7050 --tls <span class="hljs-literal">true</span> --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt  -c  <span class="hljs-string">&apos;{&quot;Args&quot;:[&quot;addTen&quot;,&quot;a&quot;]}&apos;</span>
</code></pre>
<p>&#x67E5;&#x770B;&#x7ED3;&#x679C;a&#x679C;&#x7136;&#x4E3A;100 &#x5347;&#x7EA7;&#x6210;&#x529F;</p>
<p><img src="https://img-blog.csdnimg.cn/20200215220152174.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI4NTQwNDQz,size_16,color_FFFFFF,t_70" alt="&#x5728;&#x8FD9;&#x91CC;&#x63D2;&#x5165;&#x56FE;&#x7247;&#x63CF;&#x8FF0;"></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chap7.html" class="navigation navigation-prev " aria-label="Previous page: 安装发布智能合约">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="chap9.html" class="navigation navigation-next " aria-label="Next page: 智能合约设置背书策略">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"升级智能合约","level":"1.4.2","depth":2,"next":{"title":"智能合约设置背书策略","level":"1.4.3","depth":2,"path":"content/chap9.md","ref":"content/chap9.md","articles":[]},"previous":{"title":"安装发布智能合约","level":"1.4.1","depth":2,"path":"content/chap7.md","ref":"content/chap7.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"content/chap8.md","mtime":"2020-03-12T03:45:23.155Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-12T04:24:49.792Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

